import request from '@/util/request'

export function index() {
  return request({
    url: '/api/uni/supplier/index',
    method: 'get'
  })
}

export function list(data) {
  return request({
    url: '/api/uni/supplier/list',
    method: 'post',
    data
  })
}

export function listAll(data) {
  return request({
    url: '/api/uni/supplier/list-all',
    method: 'post',
    data
  })
}

// 扫码时使用
export function view(data) {
  return request({
    url: '/api/uni/supplier/view',
    method: 'post',
    data
  })
}

// 创建扫码订单
export function saveScan(data) {
  return request({
    url: '/api/uni/offline/save-scan',
    method: 'post',
    data
  })
}

// 店家登录
export function shopLogin(data) {
  return request({
    url: '/api/user/merchant-login',
    method: 'post',
    data
  })
}

// 扫码列表
export function shopOrder(data) {
  return request({
    url: '/api/uni/offline/merchant-order',
    method: 'post',
    data
  })
}

